<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <style type="text/css">
    <!--
        h3.tighter {
            margin-top: 0px;
        }
        p.hang {
            padding-left: 25px;
            text-indent: -25px;
            margin-top: 0px;
            margin-bottom: 0px;
        }
        p.in1 {
            padding-left: 0px;
        }
        p.tightin1 {
            padding-left: 0px;
            margin-top: 2px;
            margin-bottom: 2px;
        }
        p.halftightin1 {
            padding-left: 0px;
            margin-bottom: 2px;
        }
        p.hangingin1 {
            padding-left: 50px;
            text-indent: -50px;
            margin-top: 0px;
            margin-bottom: 1px;
        }
        p.in2 {
            padding-left: 25px;
        }
        p.tightin2 {
            padding-left: 25px;
            margin-top: 2px;
            margin-bottom: 2px;
        }
        p.halftightin2 {
            padding-left: 25px;
            margin-bottom: 2px;
        }
        p.hangingin2 {
            padding-left: 75px;
            text-indent: -50px;
            margin-top: 0px;
            margin-bottom: 1px;
        }
        p.in3 {
            padding-left: 50px;
        }
        p.tightin3 {
            padding-left: 50px;
            margin-top: 2px;
            margin-bottom: 2px;
        }
        p.halftightin3 {
            padding-left: 50px;
            margin-bottom: 2px;
        }
        p.hangingin3 {
            padding-left: 100px;
            text-indent: -50px;
            margin-top: 0px;
            margin-bottom: 1px;
        }
        p.in4 {
            padding-left: 75px;
        }
        p.tightin4 {
            padding-left: 75px;
            margin-top: 2px;
            margin-bottom: 2px;
        }
        p.halftightin4 {
            padding-left: 75px;
            margin-bottom: 2px;
        }
        p.hangingin4 {
            padding-left: 125px;
            text-indent: -50px;
            margin-top: 0px;
            margin-bottom: 1px;
        }
        p.in5 {
            padding-left: 100px;
        }
        p.tightin5 {
            padding-left: 100px;
            margin-top: 2px;
            margin-bottom: 2px;
        }
        p.halftightin5 {
            padding-left: 100px;
            margin-bottom: 2px;
        }
        p.hangingin5 {
            padding-left: 150px;
            text-indent: -50px;
            margin-top: 0px;
            margin-bottom: 1px;
        }
        p.in6 {
            padding-left: 125px;
        }
        p.tightin6 {
            padding-left: 125px;
            margin-top: 2px;
            margin-bottom: 2px;
        }
        p.halftightin6 {
            padding-left: 125px;
            margin-bottom: 2px;
        }
        p.hangingin6 {
            padding-left: 175px;
            text-indent: -50px;
            margin-top: 0px;
            margin-bottom: 1px;
        }
        p.in7 {
            padding-left: 150px;
        }
        p.tightin7 {
            padding-left: 150px;
            margin-top: 2px;
            margin-bottom: 2px;
        }
        p.halftightin7 {
            padding-left: 150px;
            margin-bottom: 2px;
        }
        p.hangingin7 {
            padding-left: 200px;
            text-indent: -50px;
            margin-top: 0px;
            margin-bottom: 1px;
        }
        p.in8 {
            padding-left: 175px;
        }
        p.tightin8 {
            padding-left: 175px;
            margin-top: 2px;
            margin-bottom: 2px;
        }
        p.halftightin8 {
            padding-left: 175px;
            margin-bottom: 2px;
        }
        p.hangingin8 {
            padding-left: 225px;
            text-indent: -50px;
            margin-top: 0px;
            margin-bottom: 1px;
        }
        p.in9 {
            padding-left: 200px;
        }
        p.tightin9 {
            padding-left: 200px;
            margin-top: 2px;
            margin-bottom: 2px;
        }
        p.halftightin9 {
            padding-left: 200px;
            margin-bottom: 2px;
        }
        p.hangingin9 {
            padding-left: 250px;
            text-indent: -50px;
            margin-top: 0px;
            margin-bottom: 1px;
        }
        div.hr {
            border: 0;
            width: 100%;
            color: #707070;
            background-color: #707070;
            height: 5px;
        }
    -->
</style>
<script type="text/javascript">
    function showExtra(id, imid) {
        if (document.getElementById(id).style.display == 'block') {
            document.getElementById(id).style.display = 'none';
            document.getElementById(imid).src = 'inform:/extra.png';
        } else {
            document.getElementById(id).style.display = 'block';
            document.getElementById(imid).src = 'inform:/extraclose.png';
        }
    }
</script>
</head>
<body><font size=2>
<!--CONTENT BEGINS-->
<!--NAVIGATION BEGINS-->
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-color: #e0e0e0"><tr><td width="8"><img src="inform:/tl_corner_e0e0e0.gif" width="8" height="8" border="0" alt="..." /></td><td></td><td width="8"><img src="inform:/tr_corner_e0e0e0.gif" width="8" height="8" border="0" alt="..." /></td></tr><tr><td width="8"></td><td><font size=2><table border="0" cellspacing="0" cellpadding="0" width=100%><tr><td align="left" valign="top" width="72"><font size=2><img border=1 src=inform:/doc_images/Actions.png title="The Actions Index"> &nbsp;&nbsp;&nbsp;&nbsp;</font></td><td align="left" valign="top"><font size=2><h3 class="tighter"><b>Actions</b>: Detail view&nbsp;&nbsp;<a href=../Actions.html><font color="#002060"><i>Back to full view</i></font></a></h3><p>
<p class="tightin1">A single action in detail.<br><i>About the action rulebooks&nbsp;&nbsp;<a href=inform:/doc188.html><img border=0 src=inform:/help.png></a></i></p>
</font></td></tr></table></font></td><td width="8"></td></tr><tr><td width="8"><img src="inform:/bl_corner_e0e0e0.gif" width="8" height="8" border="0" alt="..." /></td><td></td><td width="8"><img src="inform:/br_corner_e0e0e0.gif" width="8" height="8" border="0" alt="..." /></td></tr></table></p><p>
<!--NAVIGATION ENDS-->
<b>Standard actions which change the state of things</b><br><b>Locking it with</b>&nbsp;<a href=16_A.html><img border=0 src=inform:/Beneath.png></a>, Unlocking it with&nbsp;<a href=17_A.html><img border=0 src=inform:/Beneath.png></a>, Switching on&nbsp;<a href=18_A.html><img border=0 src=inform:/Beneath.png></a>, Switching off&nbsp;<a href=19_A.html><img border=0 src=inform:/Beneath.png></a>, Opening&nbsp;<a href=20_A.html><img border=0 src=inform:/Beneath.png></a>, Closing&nbsp;<a href=21_A.html><img border=0 src=inform:/Beneath.png></a>, Wearing&nbsp;<a href=22_A.html><img border=0 src=inform:/Beneath.png></a>, Taking off&nbsp;<a href=23_A.html><img border=0 src=inform:/Beneath.png></a><p><hr><p><b>Locking <font color="#000080">something</font> with <font color="#000080">something</font> </b><a name=Lock></a> (<i>past tense</i> locked it with)<br>
<p>Locking is the act of
using an object such as a key to ensure that something such as a door or
container cannot be opened unless first unlocked. (Only closed things can be
locked.)<br><br>Locking can be performed on any kind of thing which provides the either/or
properties lockable, locked, openable and open. The 'can't lock without a lock
rule' tests to see if the noun both provides the lockable property, and if
it is in fact lockable: it is then assumed that the other properties can
safely be checked. In the Standard Rules, the container and door kinds both
satisfy these requirements.<br><br>We can create a new kind on which opening, closing, locking and unlocking
will work thus: 'A briefcase is a kind of thing. A briefcase can be openable.
A briefcase can be open. A briefcase can be lockable. A briefcase can be
locked. A briefcase is usually openable, lockable, open and unlocked.'<br><br>Inform checks whether the key fits using the 'can't lock without the correct
key rule'. To satisfy this, the actor must be directly holding the second
noun, and it must be the current value of the 'matching key' property for
the noun. (This property is seldom referred to directly because it is
automatically set by assertions like 'The silver key unlocks the wicket
gate.')<br><br>The Standard Rules provide locking and unlocking actions at a fairly basic
level: they can be much enhanced using the extension Locksmith by Emily
Short, which is included with all distributions of Inform.<p><hr><p><b>Typed commands leading to this action</b><p>
<p class="hangingin2">&quot;lock [something] with [something preferably held]&quot;</p><p><b>Rules controlling this action</b><p>
<p class="hangingin2">check&nbsp;&nbsp;&nbsp;&nbsp;<i>an actor locking something with</i>&nbsp;&nbsp;<font color="#800000">can't lock without a lock rule</font>&nbsp;&nbsp;<script language="JavaScript">
function pasteCode1644(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('can[=0x0027=]t lock without a lock rule');
}
</script>
<a href="javascript:pasteCode1644()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>name</i> <script language="JavaScript">
function pasteCode1645(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('The can[=0x0027=]t lock without a lock rule is not listed in the check locking it with rulebook.[=0x000A=]');
}
</script>
<a href="javascript:pasteCode1645()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>unlist</i></p>
<p class="hangingin2">check&nbsp;&nbsp;&nbsp;&nbsp;<i>an actor locking something with</i>&nbsp;&nbsp;<font color="#800000">can't lock what's already locked rule</font>&nbsp;&nbsp;<script language="JavaScript">
function pasteCode1646(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('can[=0x0027=]t lock what[=0x0027=]s already locked rule');
}
</script>
<a href="javascript:pasteCode1646()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>name</i> <script language="JavaScript">
function pasteCode1647(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('The can[=0x0027=]t lock what[=0x0027=]s already locked rule is not listed in the check locking it with rulebook.[=0x000A=]');
}
</script>
<a href="javascript:pasteCode1647()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>unlist</i></p>
<p class="hangingin2">check&nbsp;&nbsp;&nbsp;&nbsp;<i>an actor locking something with</i>&nbsp;&nbsp;<font color="#800000">can't lock what's open rule</font>&nbsp;&nbsp;<script language="JavaScript">
function pasteCode1648(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('can[=0x0027=]t lock what[=0x0027=]s open rule');
}
</script>
<a href="javascript:pasteCode1648()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>name</i> <script language="JavaScript">
function pasteCode1649(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('The can[=0x0027=]t lock what[=0x0027=]s open rule is not listed in the check locking it with rulebook.[=0x000A=]');
}
</script>
<a href="javascript:pasteCode1649()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>unlist</i></p>
<p class="hangingin2">check&nbsp;&nbsp;&nbsp;&nbsp;<i>an actor locking something with</i>&nbsp;&nbsp;<font color="#800000">can't lock without the correct key rule</font>&nbsp;&nbsp;<script language="JavaScript">
function pasteCode1650(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('can[=0x0027=]t lock without the correct key rule');
}
</script>
<a href="javascript:pasteCode1650()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>name</i> <script language="JavaScript">
function pasteCode1651(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('The can[=0x0027=]t lock without the correct key rule is not listed in the check locking it with rulebook.[=0x000A=]');
}
</script>
<a href="javascript:pasteCode1651()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>unlist</i></p>
<br><p class="hangingin2">carry out&nbsp;&nbsp;&nbsp;&nbsp;<i>an actor locking something with</i>&nbsp;&nbsp;<font color="#800000">standard locking rule</font>&nbsp;&nbsp;<script language="JavaScript">
function pasteCode1652(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('standard locking rule');
}
</script>
<a href="javascript:pasteCode1652()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>name</i> <script language="JavaScript">
function pasteCode1653(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('The standard locking rule is not listed in the carry out locking it with rulebook.[=0x000A=]');
}
</script>
<a href="javascript:pasteCode1653()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>unlist</i></p>
<br><p class="hangingin2">report&nbsp;&nbsp;&nbsp;&nbsp;<i>an actor locking something with</i>&nbsp;&nbsp;<font color="#800000">standard report locking rule</font>&nbsp;&nbsp;<script language="JavaScript">
function pasteCode1654(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('standard report locking rule');
}
</script>
<a href="javascript:pasteCode1654()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>name</i> <script language="JavaScript">
function pasteCode1655(code) {
    var myProject = external.Project;

    myProject.selectView('source');
    myProject.pasteCode('The standard report locking rule is not listed in the report locking it with rulebook.[=0x000A=]');
}
</script>
<a href="javascript:pasteCode1655()"><img border=0 src=inform:/doc_images/paste.png></a>&nbsp;<i>unlist</i></p>
<br><p>
<!--CONTENT ENDS-->
</font></body></html>